package com.alpha.eceasy.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 错误码常量
 * 每个模块预留1000，功能预留100
 *
 * @author huangpengfei
 */
@Getter
@AllArgsConstructor
public enum ErrorCodeEnum {
    /**
     * 系统错误100-1000
     */
    BAD_REQUEST(400, "Bad Request"),

    /**
     * 用户相关 3000-4000
     */
    USER_DENY(3890, "用户已被禁用"),

    /**
     * 业务相关 10000-99999
     */
    CONTRACT_EXIST(50001, "该合同编号已关联合同，请先废弃原合同"),
    CONTRACT_NONENTITY(50002, "该订单编号不存在"),
    PAGE_PARAM_EMPTY(50402, "分页参数为空"),
    EMAIL_CODE_ERROR(50403, "验证码错误"),
    EMAIL_NULL(50405, "验证失败"),
    USER_EXIST(50406, "用户已注册"),
    MYSQL_ADD_ERROR(50407, "添加失败"),
    RPC_BOSS_ADD_CUSTOMER(50408, "远程添加客户失败"),
    RPC_BOSS_ADD_DEMAND_ORDER(50409, "远程添加客户需求单失败"),
    USER_ID_NULL(50410, "用户id为空"),
    RPC_BOSS_ADD_DEMAND_CONTACT(50411, "远程添加需求联系单失败"),
    RPC_BOSS_UPDATE_CUSTOMER(50412, "远程修改客户信息失败"),
    USER_NOT_EXIST(50413, "用户账号不存在"),
    USER_STATUS_ERROR(50414, "用户账号异常"),
    USER_PASSWORD_ERROR(50415, "密码错误"),
    EMAIL_CODE_REPEAT(50416, "验证码已经发送，请勿重复发送"),
    USER_NAME_NULL(50417, "用户名为空"),
    EDIT_PASSWORD_ERROR(50418, "修改密码失败"),
    GUID_NULL(50419, "guid为空"),
    BIND_SELLER_ERROR(50410, "绑定销售失败"),
    INSERT_USER_ERROR(50411, "添加用户失败"),
    TOKEN_INVALID(50452, "Token失效"),
    TOKEN_MISSING(50453, "Token缺失"),
    USERNAME_PASSWORD_ERROR(50504, "用户名或密码错误"),
    PASSWORD_ERROR(50505, "原密码错误");
    private final Integer code;
    private final String msg;
}
